package com.imooc;

import java.util.Scanner;

public class GlussNumGame {

	public static void main(String[] args) {
		int number = 6;
		int guess;
		System.out.println("猜一个数字");
		do {
			System.out.println("输入你猜的数字");
			Scanner sc = new Scanner(System.in);
			guess = sc.nextInt();
			if(guess > number) {
				System.out.println("太大");
			}else if(guess < number) {
				System.out.println("太小");
			}
		}while(guess != number);
		System.out.println("猜对了，答案是"+number);
	}

}
